package jupd.gui.tray;

import java.awt.AWTException;
import java.awt.Image;
import java.awt.TrayIcon;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

public class TrayManager {
	private List<TrayController> trayControllers = new ArrayList<TrayController>();
	HashMap<String,TrayController> trayMap = new HashMap<String,TrayController> ();  // <sup>6
	
	public void newTray(String name, Image icon) {
		trayMap.put(name,new TrayController(icon));
	}
	public void addTray(String name,TrayIcon trayIcon){
		trayMap.put(name, new TrayController(trayIcon));
	}
	public void showTray(String name, boolean option) {
		try {
			trayMap.get(name).show(option);
		} catch (AWTException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
